/**
 * CC_Model_DownloadFileStateChanged.java
 */
package commands.controller;
import dataTypes.*;

/**
 * A command reporting a change of the state of the download file.
 * @author Michal Kolodziejski
 */
public class CC_Model_DownloadFileStateChanged extends ControllerCommand {
	/** A file of which the state has changed. */
	private DownloadFile downloadFile;
	/** An old state of the file. */
	private DownloadFile.DownloadStateType oldState;

	
	/**
	 * Constructor.
	 * @param downloadFile a file of which the state has changed
	 * @param oldState an old state of the file
	 */
	public CC_Model_DownloadFileStateChanged(DownloadFile downloadFile, DownloadFile.DownloadStateType oldState){
		super(ControllerCommandType.MODEL_DOWNLOAD_FILE_STATE_CHANGED);
		this.downloadFile = downloadFile;
		this.oldState = oldState;
	}


	/**
	 * @return the file of which the state has changed
	 */
	public DownloadFile getDownloadFile() {
		return downloadFile;
	}


	/**
	 * @return the old state of the file
	 */
	public DownloadFile.DownloadStateType getOldState() {
		return oldState;
	}
}
